package ab.mes.mapper;

import ab.mes.entity.Staff;
import ab.mes.entity.Staff;
import ab.mes.tools.Result;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface StaffMapper extends BaseMapper<Staff> {
    //查询人员信息
    @Select("SELECT picture,name,number FROM staff WHERE number=#{number} ORDER BY number DESC")
    public List<Staff> selectByNumber(Integer number);

    ////获取人员信息
    @Select("SELECT picture,name,number FROM staff  ORDER BY number DESC")
    public List<Staff> selectStaff1();
    //新增人员信息
    public Result insertStaff(Staff staff);
    //删除人员信息
    @Delete("delete from staff where id_Of_Staff=#{id_Of_Staff}")
    public Result deleteStaff(Integer id_Of_Staff);
    //修改人员信息
    public Result editStaff(Staff staff);
}
